﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace MsTestUtilities.SolutionAnalysis
{
    public class SolutionInfo
    {
        private readonly List<SolutionEntry> _projects;

        public SolutionInfo()
        {
            _projects = new List<SolutionEntry>();
        }

        public IList<SolutionEntry> Entries
        {
            get { return _projects; }
        }

        public string FileFormat { get; set; }

        public Version VisualStudioVersion { get; set; }

        public Version MinimumVisualStudioVersion { get; set; }

        public string Author { get; set; }

        internal void AddProjects(IEnumerable<SolutionEntry> newProjects)
        {
            _projects.AddRange(newProjects);
        }

        public string Path { get; set; }

        public string Directory {
            get { return System.IO.Path.GetDirectoryName(Path); }
        }
    }
}
